package com.ruoyi.project.system.Information.service.impl;

import java.math.BigDecimal;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.Information.mapper.CustomerInformationMapper;
import com.ruoyi.project.system.Information.domain.CustomerInformation;
import com.ruoyi.project.system.Information.service.ICustomerInformationService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-10
 */
@Service
public class CustomerInformationServiceImpl implements ICustomerInformationService 
{
    @Autowired
    private CustomerInformationMapper customerInformationMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public CustomerInformation selectCustomerInformationById(Long id)
    {
        return customerInformationMapper.selectCustomerInformationById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param customerInformation 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<CustomerInformation> selectCustomerInformationList(CustomerInformation customerInformation)
    {
        return customerInformationMapper.selectCustomerInformationList(customerInformation);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param customerInformation 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertCustomerInformation(CustomerInformation customerInformation)
    {
        return customerInformationMapper.insertCustomerInformation(customerInformation);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param customerInformation 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCustomerInformation(CustomerInformation customerInformation)
    {
        return customerInformationMapper.updateCustomerInformation(customerInformation);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCustomerInformationByIds(String ids)
    {
        return customerInformationMapper.deleteCustomerInformationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCustomerInformationById(Long id)
    {
        return customerInformationMapper.deleteCustomerInformationById(id);
    }

    @Override
    public int updateState(Integer id, String state) {
        return customerInformationMapper.updateState(id,state);
    }

    @Override
    public int updateSign1(Integer id) {
        return customerInformationMapper.updateSign1(id);
    }

    @Override
    public int updateSign2(Integer id) {
        return customerInformationMapper.updateSign2(id);
    }

    @Override
    public int updateSign3(Integer id) {
        return customerInformationMapper.updateSign3(id);
    }

    @Override
    public int amountAdd(BigDecimal amount, String loginName) {
        return customerInformationMapper.amountAdd(amount,loginName);
    }

    @Override
    public CustomerInformation selectSingle() {
        return customerInformationMapper.selectSingle();
    }

    @Override
    public int updateFlag(Long id) {
        return customerInformationMapper.updateFlag(id);
    }

//    @Override
//    public int updateState(Long id) {
//        return customerInformationMapper.updateState(id);
//    }
}
